package org.springblogs.model;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

import org.springblogs.core.Model;

@Entity
@IdClass(StockPriceId.class)
@Table(name = "stock_price")
public class StockPrice extends Model {
	private static final long serialVersionUID = -2604850836948163375L;
	@Id
	private Date tradeDate;
	@Id
	private String code;
	private String name;
	private String market;
	private BigDecimal openPrice;
	private BigDecimal closePrice;
	private BigDecimal maxPrice;
	private BigDecimal minPrice;
	private BigDecimal rise;
	private BigDecimal riseRate;
	private BigDecimal volume;
	private BigDecimal amount;

	private Timestamp updatedDate;

	public StockPrice() {
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMarket() {
		return market;
	}

	public void setMarket(String market) {
		this.market = market;
	}

	public Date getTradeDate() {
		return tradeDate;
	}

	public void setTradeDate(Date tradeDate) {
		this.tradeDate = tradeDate;
	}

	public BigDecimal getOpenPrice() {
		return openPrice;
	}

	public void setOpenPrice(BigDecimal openPrice) {
		this.openPrice = openPrice;
	}

	public BigDecimal getClosePrice() {
		return closePrice;
	}

	public void setClosePrice(BigDecimal closePrice) {
		this.closePrice = closePrice;
	}

	public BigDecimal getMaxPrice() {
		return maxPrice;
	}

	public void setMaxPrice(BigDecimal maxPrice) {
		this.maxPrice = maxPrice;
	}

	public BigDecimal getMinPrice() {
		return minPrice;
	}

	public void setMinPrice(BigDecimal minPrice) {
		this.minPrice = minPrice;
	}

	public BigDecimal getRise() {
		return rise;
	}

	public void setRise(BigDecimal rise) {
		this.rise = rise;
	}

	public BigDecimal getRiseRate() {
		return riseRate;
	}

	public void setRiseRate(BigDecimal riseRate) {
		this.riseRate = riseRate;
	}

	public BigDecimal getVolume() {
		return volume;
	}

	public void setVolume(BigDecimal volume) {
		this.volume = volume;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Timestamp getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(Timestamp updatedDate) {
		this.updatedDate = updatedDate;
	}

}